const express = require('express')
const cors = require('cors')
const app = express()
app.listen(3000)

// 授权域名  == 推荐使用，*
const allowUrl = [
  'http://localhost:4000',
  'http://localhost:5000',
  'http://localhost:6000',
]

app.use(cors({
  origin: (origin, cb) => {
    cb(null, allowUrl.includes(origin))
  }
}))

app.use((req, res) => {
  res.send('111')
})



